﻿<!--
//===============================================================================
// Mammoth Data Analysis Platform
//===============================================================================
// Copyright (C) 2008-2009 Arkadiusz Świerczek and Piotr Włodek.
// All rights reserved.
//===============================================================================
// Defines user interface for the ProgressView.
//===============================================================================
-->
    
<UserControl x:Class="WpfRcp.Views.Controls.ProgressControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Status="clr-namespace:WpfRcp.Services.Status">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type Status:RcpStatusMonitor}">
            <ProgressBar Height="20" Value="{Binding WorkDone, Mode=OneWay}" Maximum="{Binding TotalWork}" IsIndeterminate="False" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type Status:SimpleRcpStatusMonitor}">
            <StackPanel>
                <ProgressBar Height="20" IsIndeterminate="True" />
                <TextBlock Foreground="White" FontSize="12" FontWeight="Bold" Text="{Binding SubtaskName}" />
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
    
    <StackPanel>
        <TextBlock Foreground="White" FontSize="20" FontWeight="Bold" HorizontalAlignment="Center" Text="{Binding Monitor.TaskName}" />
        <ContentControl Content="{Binding Monitor}" Height="20" Width="400" Margin="12,8,12,8" />
    </StackPanel>
</UserControl>
